package com.cn.service.server.Equipment.Impl;

import com.cn.bean.pojo.ComponentMechanical.EquipmentMechanicalStructureMappingTable;
import com.cn.bean.pojo.lbj.*;
import com.cn.bean.pojo.yw.BusinessProjectSingleParameterItemCurrentDataTable;
import com.cn.bean.vo.Equipment.ComponentBasicInformation;
import com.cn.bean.vo.Equipment.EquipmentStructure;
import com.cn.mapper.dao.db5.Equipment.SingleRegistrationTableDao;
import com.cn.service.server.Equipment.SingleRegistrationTableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

@Service
public class SingleRegistrationTableServiceImpl implements SingleRegistrationTableService {
    @Autowired(required = false)
    private SingleRegistrationTableDao singleRegistrationTableDao;
    @Override
    public List<SingleRegistrationTable> selectMain(SingleRegistrationTable singleRegistrationTable) {
        return singleRegistrationTableDao.selectMain(singleRegistrationTable);
    }

    @Override
    public List<ComponentBasicInformationTable> selectComponentBasicInformationTable(ComponentBasicInformationTable componentBasicInformationTable) {
        return singleRegistrationTableDao.selectComponentBasicInformationTable(componentBasicInformationTable);
    }

    @Override
    public List<SingleRegistrationTableSub> selectSub(SingleRegistrationTableSub sub) {
        return singleRegistrationTableDao.selectSub(sub);
    }

    @Override
    public List<ComponentBasicInformation> selectComponentBasicInformation(ComponentBasicInformation componentBasicInformation) {
        return singleRegistrationTableDao.selectComponentBasicInformation(componentBasicInformation);
    }

    @Override
    public List<SingleRegistrationTableSub> selectSingleSub(SingleRegistrationTableSub sub) {
        return singleRegistrationTableDao.selectSingleSub(sub);
    }


    @Override
    public List<EquipmentStructure> selectEquipmentStructure(EquipmentStructure equipmentStructure) {
        return singleRegistrationTableDao.selectEquipmentStructure(equipmentStructure);
    }

    @Override
    public List<SingleRegistrationTableSub> selectSingleRegistrationTableSub(int id) {
        return singleRegistrationTableDao.selectSingleRegistrationTableSub(id);
    }

    @Override
    public List<EquipmentMechanicalStructureMappingTable> selectEquipmentMappingTable(EquipmentMechanicalStructureMappingTable equipmentMechanicalStructureMappingTable) {
        return singleRegistrationTableDao.selectEquipmentMappingTable(equipmentMechanicalStructureMappingTable);
    }

    @Override
    public int insertSingleRegistrationTable(SingleRegistrationTable singleRegistrationTable) {
        Boolean a=singleRegistrationTableDao.insertSingleRegistrationTable(singleRegistrationTable);
        if (a){
            return 1;
        }
        return 0;
    }

    @Override
    public int insertSingleRegistrationTableSub(SingleRegistrationTableSub sub) {
        Boolean b=singleRegistrationTableDao.insertSingleRegistrationTableSub(sub);
        if (b){
            return 1;
        }
        return 0;
    }

    @Override
    public int insertCurrentDataTable(SingleParameterItemCurrentDataTable currentDataTable) {
        Boolean c=singleRegistrationTableDao.insertCurrentDataTable(currentDataTable);
        if (c){
            return 1;
        }
        return 0;
    }

    @Override
    public int insertHistoryDataTable(SingleParameterItemHistoryDataTable historyDataTable) {
        Boolean d=singleRegistrationTableDao.insertHistoryDataTable(historyDataTable);
        if (d){
            return 1;
        }
        return 0;
    }


    @Override
    public int updateMain(SingleRegistrationTable singleRegistrationTable) {
        Boolean e=singleRegistrationTableDao.updateMain(singleRegistrationTable);
        if (e){
            return 1;
        }
        return 0;
    }

    @Override
    public int delSub(int id) {
        Boolean f=singleRegistrationTableDao.delSub(id);
        if (f){
            return 1;
        }
        return 0;
    }

    @Override
    public Integer getSingleRegistrationTableAutoid() {
        return singleRegistrationTableDao.getSingleRegistrationTableAutoid();
    }

    @Override
    public Integer getSubAutoid() {
        return singleRegistrationTableDao.getSubAutoid();
    }

    @Override
    public int delSingleRegistrationTableSub(int id) {
        Boolean x=singleRegistrationTableDao.delSingleRegistrationTableSub(id);
        if (x){
            return 1;
        }
        return 0;
    }

    @Override
    public int delMain(int id) {
        Boolean z=singleRegistrationTableDao.delMain(id);
        if(z){
            return 1;
        }
        return 0;
    }

    @Override
    public int auditMain(int id) {
        Boolean n=singleRegistrationTableDao.auditMain(id);
        if(n){
            return 1;
        }
        return 0;
    }
    @Override
    public int auditMain0(int id) {
        Boolean n=singleRegistrationTableDao.auditMain(id);
        if(n){
            return 1;
        }
        return 0;
    }

    @Override
    public SingleRegistrationTableSub selectPartSingleId(String partSingleId) {
        return singleRegistrationTableDao.selectPartSingleId(partSingleId);
    }
}
